import request from '@/utils/request'

// 查询内部工单列表
export function listWork(query) {
  return request({
    url: '/property/work/list',
    method: 'get',
    params: query
  })
}

// 查询内部工单详细
export function getWork(workOrderId) {
  return request({
    url: '/property/work/' + workOrderId,
    method: 'get'
  })
}

// 新增内部工单
export function addWork(data) {
  return request({
    url: '/property/work',
    method: 'post',
    data: data
  })
}

// 修改内部工单
export function updateWork(data) {
  return request({
    url: '/property/work',
    method: 'put',
    data: data
  })
}

// 删除内部工单
export function delWork(workOrderId) {
  return request({
    url: '/property/work/' + workOrderId,
    method: 'delete'
  })
}
